﻿using System;
using UnityEngine;

namespace Script.WorldEvent
{
    public class ScoreManager:MonoBehaviour
    {
        
        public GameObject KunTou; //球的GameObject
        public Vector3 startPoint; //起始点
        public float score; //位移（分数）
        public void Start()
        {
            startPoint = KunTou.transform.localScale;
        }

        public void Update()
        {
            GetScore();
        }

        public void GetScore() //计算球与起始点的位移
        {
            //TODO:仍有其它因素会影响最终得分
            score = Vector3.Distance(KunTou.transform.localPosition, startPoint);
        }
    }
}